package com.example.daiyinuo.decorator;

public class Decorator2 extends Decorator{
    public Decorator2(IProduct product, String name) {
        super(product, name);
    }
    public Decorator2(IProduct product){
        this.name = "塑料箱";
        this.product = product;
    }
    public void transport(){
        System.out.println("用"+this.name+"包装");
        if(this.product != null)
            this.product.transport();
    }
}
